package com.example.verification.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
 * @author rcl
 * @date 2019/7/29 9:45
 */
@Getter
@Setter
@ToString
public class User implements Serializable {
    String id;

    String name;

    String password;

    String address;

//    @JSONField(name = "create_time", format = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    Date createTime;

    String status;

    Set<Role> roles = new HashSet<>();
}
